class Solution {
public:
    int numOfUnplacedFruits(vector<int>& fruits, vector<int>& baskets) {
        
        int nCnt=0;
        for(int i=0;i<static_cast<int>(fruits.size());++i){
            for(int j=0;j<static_cast<int>(baskets.size());++j){
                if(baskets[j]>=fruits[i]){
                    ++nCnt;
                    baskets[j]=-1;
                    break;
                }
            }
            //cout<<endl;
        }
        
        return fruits.size()-nCnt;
    }
};
